<?php  if (!defined('PATH_HD')) exit('No direct script access allowed');

class publicControl extends Control{
    function __auto(){
        if (!C("flag")) {
            $this->display(PATH_ROOT.'/static/flag.html');die;
        }
        $template = __ROOT__ . '/template/' . C('tpl_style');
        $this->assign("template", $template);
        $db = M("category");
        $allcat = $db->where("pid=0")->all();
        //当前栏目信息分配到模板
        $this->assign("all",$allcat);
    }
    
}
?>